from pydantic import BaseModel
from typing import Optional
from datetime import datetime

class ConversationBase(BaseModel):
    message: str
    response: str
    meta_data: Optional[str] = None

class ConversationCreate(ConversationBase):
    knowledge_base_id: int

class ConversationResponse(ConversationBase):
    id: int
    knowledge_base_id: int
    user_id: int
    created_at: datetime
    
    class Config:
        from_attributes = True